package com.itheima.jdk8date;

import java.time.LocalDate;
import java.time.Period;

public class Demo05 {


    public static void main(String[] args) {
        LocalDate now = LocalDate.now();
        LocalDate dangBirthday = LocalDate.of(1921, 7, 1);
        Period between = Period.between(dangBirthday, now);
        System.out.println(between);
        int years = between.getYears();
        int months = between.getMonths();
        int days = between.getDays();
        long allMonth = between.toTotalMonths();
        System.out.println(years);
        System.out.println(months);
        System.out.println(days);
        System.out.println(allMonth);

    }
}
